package com.nwpu.bigdata.controller;

import java.util.List;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import com.nwpu.bigdata.model.Host;
import com.nwpu.bigdata.service.HostService;

/**
 *@version:2018年8月12日下午8:39:17
*/
/**
 * @author Administrator
 *
 */

@RestController
@RequestMapping("/host")
public class HostController {
	private static Logger logger = LoggerFactory.getLogger(LogController.class);
@Autowired
HostService hostService;

@RequestMapping(value="/allHostName", method={RequestMethod.GET}, produces="application/json;charset=UTF-8")//限制請求方式為get
public @ResponseBody List<Host> cpuQuery(ModelAndView modelAndView) throws Exception {
	List<Host> list = hostService.getAllHostName();
	return list;
}
}
